(function(){
    //设置密码切换
    $(".message .password").click(function(){
        var type = $(".message .registerPassword input").attr("type");
        if(type == "password"){
            $(".message .registerPassword input").attr({"type":"text"});
            $(".message .registerBox .password").css({"textAlign":"left","background":"#1abc9c"});
            $(".message .registerBox .circle").css({"left":".74rem"});
            $(".message .registerBox .text").html("123");
        }else{
            $(".message .registerPassword input").attr({"type":"password"});
            $(".message .registerBox .password").css({"textAlign":"right","background":"#ccc"});
            $(".message .registerBox .circle").css({"left":0});
            $(".message .registerBox .text").html("***");

        }
        
    });

//设置删除圆点
    $(".message .registerBox input").keydown(function(){
        $(this).parent().find(".delete").css({"opacity":1});
    });


    $(".message .registerBox input").blur(function(){
        $(this).parent().find(".delete").css({"opacity":0});
    });

    $(".message .registerBox input").focus(function(){
        $(this).parent().find(".delete").css({"opacity":1});
    });

    $(".message .delete").click(function(){
        $(this).siblings("input").val("");
    })
    
//设置协议圆点
    var flag = true;
    $(".message .agreement .iconfont").click(function(){
        if(flag){
            $(this).removeClass("icon-circle-thin").addClass("icon-checkcircle").css("color","#1abc9c");
            flag = false;
        }else{
            $(this).removeClass("icon-checkcircle").addClass("icon-circle-thin").css("color","#aaa");
            flag = true;
        }
    })





})();